package schoolDemo3;

import java.util.Scanner;

public class App4_4 {
    public static void main(String[] args) {
        int month,days = 0;
        Scanner reader=new Scanner(System.in);
        System.out.println("请输入月份：");
        month= reader.nextInt();
        switch (month)
        {
            case 2:
                days=28;
                break;
            case 4:
            case 6:
            case 9:
            case 11:
                days=30;
                break;
            case 1:
            case 3:
            case 5:
            case 7:
            case 8:
            case 10:
            case 12:
                days=31;
                break;
            default:System.out.println("月份格式错误，无法生成！");
        }
        System.out.println(month+"月份为"+days+"天！");
    }
}
